Repository navigation
Spec 028: A host's merged variables, and the file that sets each - #622
Open
shipmill-romamo[bot] wants to merge 1 commit into
Open
shipmill-romamo[bot] wants to merge 1 commit into
shipmill-romamo[bot] wants to merge 1 commit into
Conversation
Contributor
Author
|
@romamo Decision needed: approve spec 028 (
Reply here with a number or your own answer; shipmill takes this up on the tick after your reply. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec for #620
Plan
docs/specs/028-get-host-variables.mdstatus: approved; its build issues are filed under the feature issue once it mergesspecs.py checkpasses; each acceptance criterion names the exit code, output or file a test checkscloudfall get host <name>on a team's Ansible repository answers the host's merged variables and, for each, the file and precedence level that set the winning value, plus the lower files it overrides. It is item W-4 of the accepted plan #188 for G-4 and closes theget hostpart of the roadmap's M16 exit. Read-only; writes nothing; vaulted values are never printed.Decisions for you
None of these departs from a
D-nrule. Each adds a new command and output; no existing flag, format, default or stored state changes for existing users.How the file that wins is found
ansible-inventoryfallback); Cloudfall walks the files in Ansible's precedence order to name the winner, and checks that file's value equals the merged one. When it doesn't (a custom vars plugin,hash_behaviour = merge, a value a dynamic plugin computes), the variable says "unknown file" instead of guessingansible-inventoryHow vaulted values are shown
{"vaulted": true}in place (top level or nested), with"vaulted": trueon the variable; no hashA file Ansible Vault encrypts whole
vault_password_fileinansible.cfgor theANSIBLE_VAULT_*variables), only to learn its variable names and precedence; never prompt. Without one, refuse withansible_vault_locked, naming the file and the settingPlain (unvaulted) secrets
ansible_password,ansible_become_passwordand the like) when they are not vaulted; print every other plain value as the file holds it, since it is plain text in the repository the agent can already read*password*,*token*,*secret*,*_key). Safer, but a guess that hides harmless values and misses oddly named onesOutput shape
data.variablesas a map from variable name to{value, file, level, group?, overridden[]}, so an agent readsvariables.nginx_workers.filedirectlyname. Stable order, but every lookup is a searchHow the repository is located, and which
group_varscount--repository(default: the current directory) and--inventory(default: what itsansible.cfgnames), likemcp serve --repository; the repository is the playbook directory, sogroup_varsbeside the playbooks count as they do in a real run--inventoryonly, likeinventory show, reading only thegroup_varsbeside the inventory. Simpler, but wrong for the common layout withinventory/hosts.iniandgroup_vars/at the rootOn a Cloudfall project
fleet_inventory_undeclared, pointing atcloudfall inventory show; greenfield joins this path whencloudfall initemits a plain inventory (the plan's Notes)Unknown host and patterns
NOT_FOUND(inventory_host_unknown); a host pattern such asweb-*is a usage error. One host per callAgent access
mcp serve --repositoryserves it as the read-only toolget_host; not on a project🤖 Generated with Claude Code